home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20031118-20041115 / 000030_slash_dev_slas…_2000@yahoo.com_Tue Dec 2 09:30:17 2003.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
  2. From: slash_dev_slash_null_2000@yahoo.com (Mark Sapiro)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Problem in Kermit trying to get a file while sending it at the same time
  5. Date: 1 Dec 2003 16:13:25 -0800
  6. Organization: http://groups.google.com
  7. Lines: 65
  8. Message-ID: <deb126db.0312011613.1b889e6f@posting.google.com>
  9. References: <f0bb0f39.0311250532.1b93aad@posting.google.com> <slrnbs6r9i.oig.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311260731.11d9eb29@posting.google.com> <f0bb0f39.0311261025.6fd175b5@posting.google.com> <slrnbsa0at.dm1.fdc@sesame.cc.columbia.edu> <f0bb0f39.0312010625.7751d0a7@posting.google.com>
  10. NNTP-Posting-Host: 209.182.169.133
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Trace: posting.google.com 1070324006 11751 127.0.0.1 (2 Dec 2003 00:13:26 GMT)
  14. X-Complaints-To: groups-abuse@google.com
  15. NNTP-Posting-Date: Tue, 2 Dec 2003 00:13:26 +0000 (UTC)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14706
  17.  
  18. anthonypieper@cs.com (newexpectuser) wrote in message news:<f0bb0f39.0312010625.7751d0a7@posting.google.com>...
  19. > I think I understand the following in the article:
  20. > "Notice that failure leaves the partial file (if any) in the working
  21. > directory, where the central-site watcher process does not look for
  22. > it. Thus transient failures do no harm. The script can be run again
  23. > later.
  24. > The /DELETE switch on the PUT command removes the source file after,
  25. > and only if, it was uploaded successfully; this prevents it from being
  26. > uploaded again (you could also have it moved or renamed). This way,
  27. > even if the script is run again for the same file, it will fail
  28. > immediately because the file is no longer there. Or, if a file of the
  29. > same name is in the same place, it is a new file that should be
  30. > uploaded.
  31. > Now we can move the uploaded file from the server's working directory
  32. > to its ready directory (the syntax assumes a UNIX-like file system on
  33. > server):
  34. >   ftp rename \m(nameonly) ../ready/\m(nameonly)"
  35. > This solves my problem if I have a partial file, it will be transfered
  36. > into a directory (working) where my central-site server won't be
  37. > looking for it. Once this file has been dropped off 100%, then the
  38. > next time around I run to send files, I will then pickup a full file
  39. > in my working directory.
  40. > What I don't understand is with the above "ftp rename \m(nameonly)
  41. > ../ready/\m(nameonly)", how does this avoid moving the partial file
  42. > from the working directory to the ready directory, there will still be
  43. > a file in the working directory albeit a partial file and this command
  44. > will move it along to the ready directory.
  45.  
  46. Both Frank and Jeffrey have been responding to your questions and have
  47. really already provided the answers to the above, but I have a sense
  48. that you still don't get it, so here's a shot at what I think the
  49. confusion is.
  50.  
  51. Partial files occur in two ways.  One way is that a transfer is
  52. interrupted because of a communications error, a disconnect or
  53. whatever.  This may leave a partially transferred file on the
  54. receiver.  The material you quote above is dealing with this situation
  55. and here the sender deals with it by transferring the file to a
  56. "working" directory, testing this transfer (with "if failure" or "if
  57. success") and only after successful complete transfer, moving the file
  58. on the receiver to the "ready" directory.
  59.  
  60. The other kind of partial file that I think you're concerned about is
  61. a file that is in the process of being written by some other process
  62. when the sender considers it as a candidate for transfer.  In this
  63. case, it is up to the underlying operating system to either hide the
  64. presense of the partial file until the creating process is done with
  65. it, or to deny access to the file by another process until the
  66. creating process in done with it.  All real operating systems do this.
  67.  If the process that is creating this candidate file is a file
  68. transfer process that could actually terminate before the file is
  69. complete, then it too needs to use a "working directory"/"ready
  70. directory" scheme.
  71.  
  72. --
  73. Mark Sapiro msapiro -at- value net    The highway is for gamblers,
  74. San Francisco Bay Area, California    better use your sense - B. Dylan
  75.